package murphyhan;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.Date;

public class Photo {
	String fileName;
	String caption;
	Date time;
	GLatLng gLatLng;
	String url;


	public Photo(File file) {
		
		this.fileName = file.getName();
		this.url = file.getAbsolutePath();
		this.url = this.url.replace('\\', '/');
		this.url = "\"file:///"+this.url+"\"";

	}
	
	public Photo() {
		fileName ="";
		time = new Date();
		url = "";
	}
	
	public Photo(String name, Date date, String url, String caption) {
		this.fileName =name;
		this.time = date;
		this.url = url;
		this.caption = caption;		
	}	
	
	public String getUrl() {

		return url;
	}


	public String toString() {
		return fileName + "[" + time + "] caption["+caption+"] "+url;
	}

}
